package com.cpic.rxjava;

import android.util.Log;

public class ObservableCreate<T> extends Obsersable<T> {
    ObservableOnSubscribe<T> source;

    public ObservableCreate(ObservableOnSubscribe<T> source) {
        this.source = source;
        Log.e("ObservableCreate","id = "+this.toString());

    }

    @Override
    public void subcribeObserverActual(Observer<T> observer) {
        Log.e("ObservableCreate", this.toString()+"   "+"subcribeObserverActual");
         CreateEmitter<T> emitter = new CreateEmitter<>(observer);
         observer.onSubcribe();
         source.subcribe(emitter);
    }


}
